package com.xg.service;

import com.xg.common.request.UsedCarReq;
import com.xg.common.response.UsedCar;
import com.xg.common.result.ApiResult;
import com.xg.common.util.PageUtil;
import com.xg.common.util.PageUtils;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

@FeignClient(value = "service-car-provider")
public interface CarService {

    @RequestMapping("/car/list")
    PageUtils findCarList(@RequestParam Map<String,Object> params);

    @RequestMapping("/car/save")
    ApiResult saveUsedCar(@RequestBody UsedCar usedCar);

    @RequestMapping("/car/listNew")
    PageUtil<UsedCar> findCarListNew(@RequestParam Map<String, Object> params);

    @RequestMapping("/car/delete")
    ApiResult deleteUsedCar(@RequestParam("ids") List<Integer> ids);

    @RequestMapping("/car/info")
    ApiResult<UsedCar> selectUsedCarInfo(@RequestParam("usedCarId") Integer usedCarId);

    @RequestMapping("/car/audit")
    ApiResult auditUsedCar(@RequestBody UsedCarReq usedCarReq);
}
